package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 请求头限定
 * @author stone
 * @date 2022/03/24 11:09
 */
@RequestMapping("header")
@Controller
public class RequestHeadLimitController {

    @RequestMapping(value = "limit",headers = {"aaa","bbb"})
    @ResponseBody
    public String headerLimit() {
        return "header limit";
    }

    @RequestMapping(value = "consumes", consumes = "aaa/bbb")
    @ResponseBody
    public String consumes() {
        return "aaa/bbb";
    }
    @RequestMapping(value = "produces", produces = "ccc/ddd")
    //@ResponseBody
    public String produces() {
        //return "ccc/ddd";
        return "/hello.jsp";
    }
}
